package com.xiaoze.springcloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * User
 *
 * @author xiaoze
 * @date 2018/6/3
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tbl_users")
public class User extends Model<User> {

    private static final long serialVersionUID=1L;

    /**
     * 用户账号
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String userNo;

    /**
     * 密码
     */
    private String userPwd;

    /**
     * 用户名称
     */
    private String userName;

    @Override
    protected Serializable pkVal() {
        return this.userNo;
    }

}
